package com.example.springbootdemo;

/**
 * @author brianxia
 * @version 1.0
 * @date 2022-11-07 14:23
 */
public class MyException extends RuntimeException{

    //希望通过异常传递code msg
    private Integer code;
    private String msg;

    public MyException(String msg,Integer code) {
        super();
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
